home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 62
/
Volume 62 - JOGO DISK .iso
/
Games
/
mycutepets.swf
/
scripts
/
__Packages
/
tool.as
< prev
Wrap
Text File
|
2008-03-17
|
1KB
|
61 lines
class tool extends MovieClip
{
var _using = false;
function tool()
{
super();
this.__set__active(false);
}
function set active(bool)
{
this.mov2tg.removeMovieClip();
if(bool)
{
this._parent[this.mov1]._visible = false;
this.mov2tg = this._parent.attachMovie(this.mov2,"tool_" + this.id,this.id,{_x:this._parent._xmouse,_y:this._parent._ymouse});
this.mov2tg.startDrag(true);
}
else
{
this._parent[this.mov1]._visible = true;
}
}
function get acitve()
{
return this._act;
}
function set using(bool)
{
if(bool)
{
this._parent[this.mov1]._visible = false;
this.mov2tg.removeMovieClip();
}
else
{
this._parent[this.mov1]._visible = true;
}
this._using = bool;
}
function get using()
{
return this._using;
}
function onPress()
{
if(!this.__get__using())
{
this.sound.playSound();
this._parent.game.tool = this;
}
}
function onRelease()
{
this._parent.game.tool = null;
}
function onReleaseOutside()
{
this.onRelease();
}
}